<template>
    <van-popup v-model="showPop" position="bottom">
        <nav-bar title="业务员姓名" noLeft @click-right="showPop=false">
            <template v-slot:right>
                <van-icon name="cross" />
            </template>
        </nav-bar>
        <div class="con">
            <van-cell-group title="基本信息">
                <van-cell title="编号" :value="staffData.code||''" />
                <van-cell title="姓名" :value="staffData.name||''" />
                <van-cell title="手机号" :value="staffData.mobilePhone||''" />
                <van-cell title="身份证号" :value="staffData.certificateId||''" />
                <van-cell title="认证状态" :value="staffData.status|businessStatus" />
            </van-cell-group>
        </div>
    </van-popup>
</template>

<script>

export default {

    data() {
        return {
            showPop: false,
            staffData: {}
        }
    },

    methods: {

        show(code) {
            this.showPop = true;
            this.prepareData(code)
        },

        prepareData(code) {
            this.$http.serverChild2Query(code).then(resp => {
                if (resp === false) {
                    return false;
                }
                this.staffData = resp
            });
        },
    }
}
</script>

<style lang="scss" scoped>
.con {
    width: 100vw;
    min-height: 100vh;
    overflow: hidden;
    background-color: #f7f8fa;
    padding-bottom: 100px;
}
</style>